home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Applications / gdbm-1.7.3 / source / proto.h < prev    next >
Text File  |  1994-05-21  |  3KB  |  88 lines

  1. /* proto.h - The prototypes for the dbm routines. */
  2.  
  3. /*  This file is part of GDBM, the GNU data base manager, by Philip A. Nelson.
  4.     Copyright (C) 1990, 1991, 1993  Free Software Foundation, Inc.
  5.  
  6.     GDBM is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 2, or (at your option)
  9.     any later version.
  10.  
  11.     GDBM is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with GDBM; see the file COPYING.  If not, write to
  18.     the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20.     You may contact the author by:
  21.        e-mail:  phil@cs.wwu.edu
  22.       us-mail:  Philip A. Nelson
  23.                 Computer Science Department
  24.                 Western Washington University
  25.                 Bellingham, WA 98226
  26.  
  27. *************************************************************************/
  28.  
  29.  
  30. /* Define our _PROTOTYPE macro. */
  31.  
  32. #ifdef _ARGS
  33. #undef _ARGS
  34. #endif
  35.  
  36. #ifdef __STDC__
  37. #define _ARGS(args) args
  38. #else
  39. #define _ARGS(args) ()
  40. #endif
  41.  
  42.  
  43. /* From bucket.c */
  44. void _gdbm_new_bucket    _ARGS((gdbm_file_info *dbf, hash_bucket *bucket,
  45.                 int bits ));
  46. void _gdbm_get_bucket    _ARGS((gdbm_file_info *dbf, word_t dir_index ));
  47. void _gdbm_split_bucket  _ARGS((gdbm_file_info *dbf, word_t next_insert ));
  48. void _gdbm_write_bucket  _ARGS((gdbm_file_info *dbf, cache_elem *ca_entry ));
  49.  
  50. /* From falloc.c */
  51. off_t _gdbm_alloc       _ARGS((gdbm_file_info *dbf, int num_bytes ));
  52. void _gdbm_free         _ARGS((gdbm_file_info *dbf, off_t file_adr,
  53.                    int num_bytes ));
  54. int  _gdbm_put_av_elem  _ARGS((avail_elem new_el, avail_elem av_table [],
  55.                    int *av_count ));
  56.  
  57. /* From findkey.c */
  58. char *_gdbm_read_entry  _ARGS((gdbm_file_info *dbf, int elem_loc));
  59. int _gdbm_findkey       _ARGS((gdbm_file_info *dbf, datum key,  char **dptr,
  60.                    word_t *new_hash_val));
  61.  
  62. /* From hash.c */
  63. word_t _gdbm_hash _ARGS((datum key ));
  64.  
  65. /* From update.c */
  66. void _gdbm_end_update   _ARGS((gdbm_file_info *dbf ));
  67. int _gdbm_fatal         _ARGS((gdbm_file_info *dbf, char *val ));
  68.  
  69. /* From gdbmopen.c */
  70. int _gdbm_init_cache    _ARGS((gdbm_file_info *dbf, int size));
  71.  
  72. /* The user callable routines.... */
  73. void  gdbm_close      _ARGS((gdbm_file_info *dbf ));
  74. int   gdbm_delete      _ARGS((gdbm_file_info *dbf, datum key ));
  75. datum gdbm_fetch      _ARGS((gdbm_file_info *dbf, datum key ));
  76. gdbm_file_info *gdbm_open _ARGS((char *file, int block_size,
  77.                  int flags, int mode,
  78.                  void (*fatal_func) (void)));
  79. int   gdbm_reorganize      _ARGS((gdbm_file_info *dbf ));
  80. datum gdbm_firstkey       _ARGS((gdbm_file_info *dbf ));
  81. datum gdbm_nextkey        _ARGS((gdbm_file_info *dbf, datum key ));
  82. int   gdbm_store          _ARGS((gdbm_file_info *dbf, datum key,
  83.                  datum content, int flags ));
  84. int   gdbm_exists      _ARGS((gdbm_file_info *dbf, datum key));
  85. void  gdbm_sync          _ARGS((gdbm_file_info *dbf));
  86. int   gdbm_setopt      _ARGS((gdbm_file_info *dbf, int optflag,
  87.                  int *optval, int optlen));
  88.